package com.aletto.general_store.data.entities;

public class WalletAccount {

    private String nickname;
    private String avatar;

    public String getNickname() {
        if (nickname == null) {
            return "null";
        }

        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }


    // ----------------------------- 钱包信息 ---------------------------

    private final String address;
    private String mnemonic;
    private final String privateKey;

    private final String keystore;

    private final String encXPub;

    public WalletAccount(String address, String keystore, String encXPub, String privateKey) {
        this.address = address;
        this.keystore = keystore;
        this.encXPub = encXPub;
        this.privateKey = privateKey;
    }

    public WalletAccount(String address, String mnemonic, String privateKey, String keystore, String encXPub) {
        this.address = address;
        this.mnemonic = mnemonic;
        this.privateKey = privateKey;
        this.keystore = keystore;
        this.encXPub = encXPub;
    }

    public String getKeystore() {
        return keystore;
    }

    public String getEncXPub() {
        return encXPub;
    }

    public String getAddress() {

        return "0x" + address;
    }

    public String getMnemonic() {
        return mnemonic;
    }

    public String getPrivateKey() {
        return privateKey;
    }

}
